#include<iostream>
#include"HttpServer.hpp"
#include<string>
#include<memory>
#include<ctime>
#include"Log.hpp"
static void Usage(std::string proc)
{
    std::cout<<"Usage:\n\t"<<proc<<" port"<<std::endl;
}

int main(int argc,char*argv[])
{
    //LOG(INFO,"debug project!");

    
    if(argc!=2)
    {
        Usage(argv[0]);
        exit(4);
    }
    int port=atoi(argv[1]);
    std::shared_ptr<HttpServer> http_server(new HttpServer(port));
    http_server->InitServer();//获取单例并初始化http服务器
    http_server->Loop();//服务器持续运行
    return 0;
}